{% block sw_country_state_detail %}
<sw-modal
    class="sw-country-state-detail"
    :title="modalTitle"
    @modal-close="onCancel"
>
    {% block sw_country_state_detail_modal %}
    <sw-container
        columns="1fr 1fr"
        gap="20px"
    >
        <!-- eslint-disable sw-deprecation-rules/no-twigjs-blocks, vue/attributes-order -->
        {% block sw_country_state_detail_modal_technical_name %}

        <mt-text-field
            v-model="countryState.name"
            name="sw-field--countryState-name"
            :disabled="!acl.can('country.editor') || undefined"
            :label="$tc('sw-country-state-detail.labelName')"
            :placeholder="placeholder(countryState, 'name')"
        />
        {% endblock %}

        {% block sw_country_state_detail_modal_shortcode %}

        <mt-text-field
            v-model="countryState.shortCode"
            name="sw-field--countryState-shortCode"
            :disabled="!acl.can('country.editor') || undefined"
            :label="$tc('sw-country-state-detail.labelShortCode')"
        />
        {% endblock %}

        {% block sw_country_state_detail_modal_position %}
        <mt-number-field
            v-model="countryState.position"
            name="sw-field--countryState-position"
            :disabled="!acl.can('country.editor') || undefined"
            :tooltip-text="$tc('sw-country-state-detail.tooltipPosition')"
            number-type="int"
            :label="$tc('sw-country-state-detail.labelPosition')"
        />
        {% endblock %}
    </sw-container>

    {% block sw_country_state_detail_modal_footer %}
    <template #modal-footer>
        {% block sw_country_state_detail_modal_footer_cancel %}
        <mt-button
            size="small"
            @click="onCancel"
            variant="secondary"
        >
            {{ $tc('global.default.cancel') }}
        </mt-button>
        {% endblock %}

        {% block sw_country_state_detail_modal_footer_save %}
        <mt-button
            v-tooltip.bottom="tooltipSave"
            class="sw-country-state-detail__save-button"
            variant="primary"
            size="small"
            :disabled="!acl.can('country.editor') || undefined"
            @click="onSave"
        >
            {{ $tc('sw-country-state-detail.buttonSave') }}
        </mt-button>
        {% endblock %}
    </template>
    {% endblock %}
    {% endblock %}
</sw-modal>
{% endblock %}
